package com.heatup.apt.common.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.AutoMapper;
import com.heatup.apt.model.PresaleTeamUserApiModel;
import com.heatup.apt.model.TSysPresaleTeam;
import com.heatup.apt.model.order.OrderCoachPrivate;
import org.springframework.stereotype.Component;

/**
 *
 * TSysPresaleTeam 表数据库控制层接口
 *
 */
@Component
public interface TSysPresaleTeamMapper extends AutoMapper<TSysPresaleTeam> {
	
	/**
	 * 根据用户Id 或者是手机码号查询用户 
	 * @param userId
	 * @return
	 */
	TSysPresaleTeam queryTSysPresaleTeamByUserIdOrMobile(@Param("userId") Integer userId, @Param("mobile") String mobile);
	
	/**
	 * 查询一个会籍顾问下面的成员
	 * @param parentUserId
	 * @return
	 */
	List<PresaleTeamUserApiModel> queryPresaleTeamAll(Integer userId);
	
	/**
	 * 获取咨询订单
	 * @return
	 */
	List<OrderCoachPrivate> queryStoreAdvisoryList(String payTime);
	
	/**
	 *查询会籍顾问
	 */
	TSysPresaleTeam queryTSysPresaleTeamBy(Map<String,Object> paramMap);
	
	/**
	 * 删除普通用户的角色
	 */
	Integer delOrdinaryUserRole(@Param("userId") Integer userId, @Param("mobile") String mobile);
}